\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\usepackage[margin=1in]{geometry}
\pagestyle{plain}
\fontsize{12pt}{14.4pt}

\begin{document}
    %%%%%%%%%%%%%%%%%%%%%
    \begin{titlepage}
        \title{Zero Padding}
        \author{Zongliang Hou}
        \date{Data: \today}
    \end{titlepage}
    % 生成标题页
    \maketitle
    \newpage
    % 生成目录
    \tableofcontents
    \newpage
    %%%%%%%%%%%%%%%%%%%%%

    \section{Zero Padding}
    \subsection{Concept}
    Zero padding is a simple concept; it simply refers to adding zeros to end of a time-domain signal to increase its length.
    
    Why do you want to zero pad time-domain data?
    \begin{enumerate}
        \item To make a waveform have a power-of-two number of samples
        
        Because we can use radix-2 FFT algorithms to speed up processing time. 
        
        \item We want to see some particular peak in the spectrum
    \end{enumerate}
    \subsection{Definition}
    The stanford \href{https://ccrma.stanford.edu/~jos/mdft/Zero_Padding.html}{website} define the zero padding as follows: 

    \textit{Zero Padding} consists of extending a signal with zeros. It maps a length $N$ signal to a length $M > N$ signal, but $N$ need not divide $M$. 
    \begin{equation*}
        \text{ZEROPAD}_{M, m(x)} \triangleq 
        \begin{cases}
            x(m), & |m| < N/2 \\
            0, & \text{otherwise}
        \end{cases}
    \end{equation*}
    
    where $m=0, \pm 1, \pm 2, \dots, \pm M_h$, with $M_h \triangleq (M-1)/2$ for $M$ odd, and $M/2 - 1$ for $M$ even.

    \subsection{Causal Zero Padding}
    In practice, there are commonly no negative-time samples. So it is proper to zero padding by simply appending zeros at the end of the frame. 

    \section{FFT Frequency Resolution}
    The FFT Frequency Resolution is defined by followed formula: 
    \begin{equation*}
        \Delta R = \frac{f_s}{N_{fft}}
    \end{equation*}
    \begin{itemize}
        \item $f_s$: sampling frequency 
        \item $N_{fft}$: the number of FFT points
    \end{itemize}
    Three considerations should factor into your choice of FFT size, zero padding, and time-domain data length.
    \begin{itemize}
        \item What waveform frequency resolution do you need?
        \item What FFT resolution do you need?
        \item Does your choice of FFT size allow you to inspect particular frequencies of interest?
    \end{itemize}
    \begin{enumerate}
        \item The waveform frequency resolution should be smaller than the minimum spacing between frequencies of interest.
        \item The FFT resolution should at least support the same resolution as your waveform frequency resolution.    Additionally, some highly-efficient implementations of the FFT require that the number of FFT points be a power of two.
        \item You should ensure that there are enough points in the FFT, or the FFT has the correct spacing set, so that your frequencies of interest are not split between multiple FFT points.
    \end{enumerate}

One final thought on zero padding the FFT:

If you apply a windowing function to your waveform, the windowing function needs to be applied before zero padding the data. This ensures that your real waveform data starts and ends at zero, which is the point of most windowing functions.

\end{document}
